/**
 * User: Paulo Fournier
 * Date: 12-08-2013
 * Mobile data model
 */

Ext.define('Mobile-app.model.WhatsAround', {
    extend: 'Ext.data.Model',

    config: {
        autoLoad: false,
        fields: [
            {name: 'id',                type: 'int'},
            {name: 'distance',          type: 'float'},
            {name: 'duration',          type: 'float'},
            {name: 'bounds'},
            {name: 'polyline',          type: 'string'},
            {name: 'longitude',         type: 'float'},
            {name: 'latitude',          type: 'float'},
            {name: 'reference',         type: 'string'}

        ],
        proxy: {
            type: 'ajax',
            url: 'app/php/public/mobile.whatsaround.php',
            reader: {
                type: 'json'
            },
            actionMethods: {
                create: 'POST', read: 'POST', update: 'POST', destroy: 'POST'
            }
        }
    }

})